<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>

<head>
    <title>人群管理</title>
</head>

<body>

<div id="wrapper">
    <div class="gray-bg">
        <div class="row  m-t-sm">
            <div class="col-lg-12">
                <ol class="breadcrumb f-fl">
                    <li>
                        <i class="fa fa-location-arrow"></i> <a>人群管理</a>
                    </li>
                    <li class="active">
                        <strong>人群管理</strong>
                    </li>
                </ol>
                <span class="navbar-right  m-r m-t-8"><a href="${ctx}/admin/crowd/edit?" class="btn-primary btn-add "> <i class='fa fa-plus-square-o'></i> 新 增</a></span>
            </div>
        </div>
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox">
                        <div class="ibox-content">
                            <div class="search-area">
                            </div>
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover dataTables" id="data-table"></table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</div>


<!-- Page-Level Scripts -->
<script>
    $(document).ready(function () {
        var setting = {
            "ajax": {
                "url": "${ctx}/admin/crowd/list",
                "type": "POST"
            },
            "columns": [
                {"title": "编号", "data": "sn", "width": "30%", "orderable": false},
                {"title": "人群", "data": "title", "width": "30%", "orderable": false},
                {"title": "操作", "data": null, "width": "40%", "orderable": false}
            ],
            "columnDefs": [
                {
                    "targets": 2,
                    "render": function (data, type, row, meta) {
                        var result =
                                "<a class='btn btn-xs default btn-editable' href='${ctx}/admin/crowd/edit?id=" + data.id + "'><i class='fa fa-pencil-square-o'></i> 编辑 </a>";
                        return result;
                    }
                },
            ],
            "order": [
                [0, "asc"]
            ]
        };
        /* Init DataTables */
        $('#data-table').DataTable(ehconfig.get_datatable_config(setting));
        submitFilter = function () {
            $('#data-table').DataTable().draw();

        }
    });
    //    function clean() {
    //        $('#begin_time1').val('');
    //        $('#begin_time2').val('');
    //        $('#type').val('');
    //        $('#data-table').DataTable().draw();
    //    }

</script>

</body>

</html>
